<style>
  .thumb {
    height: 75px;
    border: 1px solid #000;
    margin: 10px 5px 0 0;
  }
</style>

<input type="file" id="files" name="files[]" multiple />
<output id="list"></output>

<script>
  function handleFileSelect(evt) {
    var files = evt.target.files; // FileList object
	//console.log(files.length)
	var RNAQCdata = new Array(files.length);

	console.log(RNAQCdata)
    // Loop through the FileList and render image files as thumbnails.
    for (var i = 0; i < files.length; i++) {

      // Only process image files.
      //if (!f.type.match('image.*')) {
      //  continue;
      //}

    var reader = new FileReader();
    console.log(files)
    reader.readAsText(files[i]);

	reader.onload = function(e) {
  			var text = reader.result;
  			//console.log(text)
  			var n = text.split(/\r?\n/);
  			var nSplit = n[7].split(/\t/);
  			console.log(i);
  			Temp = new Array(10);
  			Temp[1] = nSplit[1];
  			Temp[2] = nSplit[10];
  			Temp[3] = nSplit[11];
  			Temp[4] = nSplit[12];
  			Temp[5] = nSplit[13];
  			Temp[6] = nSplit[14];
  			Temp[7] = nSplit[15];
  			Temp[7] = nSplit[16];
  			console.log(Temp)
  			return(Temp)
	}

	//RNAQCdata[i] = reader.onload

      // Read in the image file as a data URL.



    }
	  console.log(RNAQCdata[i])
  }

  document.getElementById('files').addEventListener('change', handleFileSelect, false);
</script>
